<template>
  <component :is="componentName" :id="rowId" @subPage="subPage"></component>
</template>
<script lang="ts" setup name="bidOffice">
import BiddingOffice from './bidOffice.vue'
import AnnounceDetail from '@/views/components/announceDetail/index.vue'

let rowId: undefined | number = undefined
const componentName: Record<string, any> = ref(BiddingOffice)
const pageList = [BiddingOffice, AnnounceDetail]

const subPage = (index, id) => {
  componentName.value = pageList[index]
  if (index === 1) {
    rowId = id
  }
}
</script>
